<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="commonJS::commonJsCss('日志查询')">
    <title>日志查询</title>
</head>
<body ng-app="logApp" ng-controller="logCtrl" ng-init="init()">
<!--通用头部-->
<div th:replace="head::header" ></div>
<div th:replace="menu::menu" ></div>
<div style="height: 91%;background-color: #ffffff;">
    <div class="form-query" style="background-color: #dfe2e4;width: 88%;">
        <table class="div_form_table">
            <tr>
                <td class="div_form_middle_title" style="text-align: left;">
                    开始日期：
                    <input id="startDate" name="startDate" size="25" type="text" class="Wdate"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')}',onpicked:function(){$(this).trigger('change')}})"
                           data-ng-model="startDate" readonly/>
                    结束日期：
                    <input id="endDate" name="endDate" size="25" type="text" class="Wdate"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}',onpicked:function(){$(this).trigger('change')}})"
                           data-ng-model="endDate" readonly/>
                    操作人：
                    <input id="operator" name="operator" data-ng-model="operator" size="15" type="text" />
                    日志类型：
                    <select id="logType" data-ng-model="logType">
                        <option value=""><-- 请选择 --></option>
                        <option value="0">计费规则管理</option>
                        <option value="1">合同用户管理</option>
                        <option value="2">自动处理账单</option>
                        <option value="3">计费账单查询</option>
                        <option value="4">权限管理</option>
                        <option value="29">JOB日志</option>
                        <option value="30">异常日志</option>
                    </select>
                    内容详情：
                    <input id="content" name="content" data-ng-model="content" size="15" type="text" />
                    <button class="form-btn-edit" data-ng-click="loadLog()">查询</button>
                    <button class="form-btn-edit" data-ng-click="clear()">清空</button>
                </td>
            </tr>
        </table>
    </div>

    <div class="form-table" style="width: 88%;min-height: 605px;">
        <!--表格+条件查询+关联+分页-->
        <div class="billingrule_table_div">
            <div class="form-table" style="margin: 20px;" id="printpart">
                <!--表格加分页：inline-block使分页在表格下-->
                <div class="page-in-table" data-ng-show="systemOperationLog">
                    <!--表格-->
                    <table class="efbtable">
                        <thead>
                        <tr>
                            <th class="efbth" style="width: 10%">操作类型</th>
                            <th class="efbth">内容详情</th>
                            <th class="efbth" style="width: 10%">操作人</th>
                            <th class="efbth" style="width: 15%">操作时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="log in logs">
                            <td class="efbTable-border"><span>{{log.operationType}}</span></td>
                            <td class="efbTable-border"><span>{{log.content}}</span></td>
                            <td class="efbTable-border"><span>{{log.operator}}</span></td>
                            <td class="efbTable-border"><span>{{log.createAt}}</span></td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div class="page-in-table" data-ng-show="systemErrorLog">
                    <table class="efbtable">
                        <thead>
                        <tr>
                            <th class="efbth">日志内容</th>
                            <th class="efbth" style="width: 20%">操作时间</th>
                        </tr>
                        </thead>
                        <tbody ng-cloak>
                        <tr ng-repeat="log in logs">
                            <td class="efbTable-border">
                                <span>{{log.content }}</span>
                                <span class="devSelect" data-ng-show="log.allContent != ''" data-ng-click="showAllContentsModal(log.allContent)">&nbsp;...&nbsp;</span>
                            </td>
                            <td class="efbTable-border">
                                <span title="{{log.createAt }}" class="efbtd-nowrap-long">{{log.createAt }}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div class="page-in-table" data-ng-show="systemJobLog">
                    <table class="efbtable">
                        <thead>
                        <tr>
                            <th class="efbth">日志内容</th>
                            <th class="efbth" style="width: 20%">操作时间</th>
                        </tr>
                        </thead>
                        <tbody ng-cloak>
                        <tr ng-repeat="log in logs">
                            <td class="efbTable-border">
                                <span>{{log.content }}</span>
                            </td>
                            <td class="efbTable-border">
                                <span title="{{log.createAt }}" class="efbtd-nowrap-long">{{log.createAt }}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!-- 分页 :共用page.html-->
                <div th:replace="newPage::newPagehtml"></div>
            </div>
        </div>
    </div>
</div>

<!--日志详情窗口-->
<div class="modal fade" tabindex="-1" role="dialog" id="showAllLogModal">
    <div class="modal-dialog" role="document" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-header modal-header-efb">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title modal-title-efb">日志详情</h4>
            </div>
            <div id="loadsheetstaff" class="modal-body" style="max-height: 500px;overflow: auto">
                <div class="row-fluid">
                    <div class="span12">
                        {{logContent}}
                    </div>
                </div>
            </div>
            <div class="modal-footer modal-footer-efb">
                <button type="button" class="form-btn-cancel" data-ng-click="closeAllContentsModal()">关闭</button>
            </div>
        </div>
        <!--外部容器的DIV随着内部DIV增多而增加高度-->
        <div style="clear:both;"></div>
    </div>
</div>
<!--通用尾部-->
<div th:replace="footer::footer" ></div>
</body>
<script type="text/javascript" th:src="@{/js/log/LogModule.js}"></script>
<script type="text/javascript" th:src="@{/js/common/cookieUtil.js}"></script>
<script type="text/javascript" th:src="@{/js/log/LogService.js}"></script>
<script type="text/javascript" th:src="@{/js/log/LogController.js}"></script>
<!--时间插件-->
<script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}" charset="UTF-8"></script>
</html>